<template>
<div><img src="../assets/images/8139f4c8703921b849a1d73ba1c078b4.png" alt="">
<button @click="jump">跳过&nbsp;{{ num }}</button></div>
</template>

<script>
export default {
  name: 'IndexView',
  data () {
    return {
      num: 3,

      timeId: ''
    }
  },
  methods: {
    jump () {
      this.$router.push('/login')
      clearInterval(this.timeId)
    }
  },
  created () {
    this.timeId = setInterval((
    ) => {
      this.num--
      if (this.num === 0) {
        this.jump()
      }
    }, 1000)
  }
}
</script>

<style lang="less" scoped>
img{
  width: 100%;
  height: 100%;
}
button{
  border: none;
  position: absolute;
  width: 70px;
  height: 30px;
  background-color: #808080;
  color: #fff;
  top: 5%;
  right: 5%;
}
</style>
